1. Field of the Invention
The present invention relates to an apparatus and a method for image processing, and a computer product in which a tone corresponding to bits in an image in preserved, and mean value preservability and the visual performance can be substantially obtained.
2. Description of the Related Art
Conventionally, in a color copying machine having an image storage unit such as a hard disk, an image read by a scanner is stored in the hard disk, and transmitted to external equipment. Considering storage capacity and transmission speed, images are generally compressed before storing or transmitting. Another conventional apparatus is one in which lossy compression is employed, as represented by Joint Photographic Experts Group (JPEG). In the lossy compression method, high compression efficiency can be expected with a little effect on the image quality, depending on the image. The JPEG images can be displayed on a display unit using general-purpose software on a personal computer (PC), and hence its accessibility is excellent. To output an image as a copied image, an image stored must be read out, and subjected to image processing for reproducing the image.
The method in JPEG adapted by most types of general-purpose software is a baseline method of JPEG, and its limitation is that the number of bits in the baseline method is 8 bits for each color. However, sometimes, it is desired to store an image expressed by more than 8 bits. The most noticeable example is when the number of input bits in an input unit (scanner) is larger than 8 bits. In fact, a 12-bit input unit (scanner) is available in the market. Using 12 bits in the input stage reduces quantization errors. Further, when processing such as nonlinear operation and color space conversion is performed during scanner input and storing of images, a number of bits may be required to approximate these conversions to reversible conversion. This is because quantization errors should be reduced to approximate the conversion to the reversible conversion. In the nonlinear operation, in which complete reversible conversion requires real number calculation, as the number of bits increases, quantization errors decreases, and approximates to the real number calculation.
The color space conversion method is specifically explained here. It is an effective technique to store the color space signals in a hard disk, and does not depend on devices such as an input unit and an output unit. Moreover, an advantage of the color space conversion is that color reproducibility does not change even when the input unit or the output unit changes. sRGB (standard-RGB), sYCC, and scRGB are well-known device-independent color spaces. However, sRGB has a narrow color gamut, requires gamut compression with respect to the input image from a scanner, and has poor color reproducibility. On the other hand, sYCC and scRGB have substantially sufficient color gamut, but due to problems such as the size of the color gamut and quantization errors, it is necessary to express an image with a larger number of bits than in sRGB. To store a JPEG-compressed image expressed by a large number of bits, a bit number reduction unit is necessary. However, if low-order 2-bits are simply omitted, there is a problem in that a pseudo profile that is not visible in the case of 10-bit expression is visible in some images.                (1) Japanese Patent Application Laid-open No. H2-153676 discloses an image forming apparatus that converts high-tone image data of N bits into N-m bit data. In this technique, low-order M bits of the N bit data are binarized, and high-order N-m bits of the N bit data are combined with the binarized one-bit data, to generate N-m bit data. Expressing the low-order M bits corresponding to the omitted portion by pseudo tone and binarizing the M bits, enables to store the tone corresponding to N bits by area coverage modulation, and to thus prevent occurrence of a pseudo profile. Such a technique has been in use when there is a limitation in the number of tones that can be displayed by a display unit, or when there is a limitation in the number of bits to be transmitted, and the like, and particularly for displaying on a television screen.        
However, reduction in number of bits executed on the television is not executed by assuming subsequent lossy compression because a lossy compressor is not included. Even in the conventional art, in which the number of bits is reduced by using pseudo tone processing for data transmission, lossless compression is assumed in most cases. On the other hand, an apparatus having a lossy compressor such as the JPEG, executes lossy compression after reducing the number of bits from 10 bits to 8 bits. If pseudo tone processing is performed with respect to an image to reduce the number of bits from 10 bits to 8 bits and then the JPEG processing is performed, there is a problem in that information for the low-order 2 bits subjected to the pseudo tone processing is almost lost, depending on the pseudo tone processing. In the lossy compression, because the compressibility is increased by unsmoothing a quantization step for high frequency components, the loss occurs when the information for the low-order 2 bits is present just in the place where it is unsmooth in the quantization step.                (2) Further, there are few apparatuses that perform lossy compression such as JPEG after performing the pseudo tone processing. Japanese Patent Application Laid-open No. H8-317393 discloses an image forming technique in which JPEG compression is performed after error diffusion (or dither processing). In this technique, after the number of bits is reduced from 8 bits to 4 bits by error diffusion, “0000” is added to the low-order bits to form 8-bit data, and the data is JPEG-compressed and stored in an image memory. However, the object of this technique is to reduce the storage capacity of the image memory (a memory used for a blocking unit 61 in FIG. 3), and not preservation of tone after the lossy compression, nor preservation of tone corresponding to 10 bits, which is the number of bits equal to or larger than the bits at the time of JPEG compression. There is also a problem that when compressed data is transmitted to external equipment and displayed on a monitor a halftone image is visible (noticeability of error diffusion or dither basic tone).        (3) Japanese Patent Application Laid-open No. 2001-277602 discloses an apparatus in a printer system that performs image processing and compression processing suitable for each object, where the halftone processing is included in the image processing, and performs error diffusion and dither processing. In some cases, the compressibility is switched.        (4) Further, Japanese Patent Application Laid-open No. H9-149260 discloses an image forming apparatus that performs compression after the dither processing, and in which an amount of generated code of compressed data is monitored. As long as the amount of code is within an allowable range, multi-level dither processing and lossless compression are performed. Only when the amount of code exceeds the allowable range, the processing method is switched to binary dither processing and lossy compression.        
The technique in (1) is a practical technique for displaying images on the television screen, but the number of bits is not reduced by assuming the lossy compression, because the lossy compressor is not provided in the stage after reduction of number of bits. The technique in (2) is for reducing the storage capacity of the image memory, and does not aim at preserving the tone after the lossy compression, nor at preserving the tone corresponding to 10 bits, which are larger than those at the time of JPEG compression. Therefore, the problem that a halftone image appears when compressed data is transmitted to external equipment and displayed on a monitor, still persists. The techniques in (3) and (4) include lossy compression after the halftone processing only when the compressibility is prioritized, and hence, do not include a function of maintaining the tone.